oracle.pg.text

## Interface OracleIndex<T extends Element>

- All Superinterfaces:
    Index<T>
  All Known Subinterfaces:
    OracleAutoIndex<T>
  All Known Implementing Classes:
    LuceneAutoIndex, LuceneEdgeAutoIndex, LuceneEdgeIndex, LuceneIndex, LuceneVertexAutoIndex, LuceneVertexIndex, NoSQLLuceneEdgeAutoIndex, NoSQLLuceneVertexAutoIndex, NoSQLSolrEdgeAutoIndex, NoSQLSolrVertexAutoIndex, SolrAutoIndex, SolrEdgeAutoIndex, SolrEdgeIndex, SolrIndex, SolrVertexAutoIndex, SolrVertexIndex

      public interface OracleIndex<T extends Element>
      extends Index<T>

  An interface extending the Blueprints Index interface.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `EDGE_ID_PROP` A constant text index field name for the ID of an edge
    `static String` | `EDGE_LABEL_PROP` A constant text index field name for the label of an edge
    `static String` | `END_NODE_ID_PROP` A constant text index field name for the ID of an edge's head (destination) vertex
    `static String` | `START_NODE_ID_PROP` A constant text index field name for the ID of an edge's tail (starting) vertex
    `static char` | `TYPE_DT_BOOL` This constant denotes a Boolean data type for the value field of an attribute (K/V pair)
    `static char` | `TYPE_DT_DATE` This constant denotes a Date (java.util.Date) data type for the value field of an attribute (K/V pair)
    `static char` | `TYPE_DT_DOUBLE` This constant denotes a Double data type for the value field of an attribute (K/V pair)
    `static char` | `TYPE_DT_FLOAT` This constant denotes a Float data type for the value field of an attribute (K/V pair)
    `static char` | `TYPE_DT_INTEGER` This constant denotes an Integer data type for the value field of an attribute (K/V pair)
    `static char` | `TYPE_DT_SERIALIZABLE` This constant denotes a Serializable data type for the value field of an attribute (K/V pair)
    `static char` | `TYPE_DT_STRING` This constant denotes a String data type for the value field of an attribute (K/V pair)
    `static String` | `VERTEX_ID_PROP` A constant text index field name for the ID of a vertex

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(T element)` Adds a new Element into the index using all its associated key/value pairs
    `String` | `buildSearchTerm(String key, Object value)` Builds a search term query expression in the syntax required by this index.
    `String` | `buildSearchTerm(String key, Object value, Class dtClass)` Builds a search term query expression in the syntax required by this index.
    `void` | `clearIndex()` Clears all data stored in the text index.
    `void` | `close()` Closes this OracleIndex object
    `void` | `commit()` Commit changes
    `long` | `count(String key, Object value, boolean acceptWildcard)` Counts all the matching elements that have a particular key/value property within the index
    `long` | `count(String key, Object value, Class dtClass, boolean acceptWildcard)` Counts all the matching elements that have a particular key/value property within the index
    `void` | `dropIndex()` Drops and removes all data from the text index (including its directory)
    `CloseableIterable<T>` | `get(String key, Object value, boolean acceptWildcard)` Gets an Iterable object with all the matching elements that have a particular key/value property within the index
    `CloseableIterable<T>` | `get(String key, Object value, Class dtValue, boolean acceptWildcard)` Gets an Iterable object with all the matching elements that have a particular key/value property within the index
    `String` | `getDirectoryName()` Gets the directory name for this index.
    `String` | `getDocIdentifier()` Get index document's identifier.
    `String` | `getGraphName()` Get the name of the associated graph
    `Class<T>` | `getIndexClass()` Gets the class associated to this index
    `OracleIndexParameters` | `getOracleIndexParameters()` Gets the OracleIndexParameters associated to this index
    `Parameter[]` | `getParameters()` Gets the OracleIndexParameters associated to this index
    `CloseableIterable<T>[]` | `getPartitioned(Object[] connections, String key, Object value, boolean acceptWildcard, int startShardId)` Gets an array of `CloseableIterable` objects that hold all the elements with an attribute matching the given K/V pair.
    `CloseableIterable<T>[]` | `getPartitioned(Object[] connections, String key, Object value, Class dtValue, boolean acceptWildcard, int startShardId)` Gets an array of `CloseableIterable` objects that hold all the elements with an attribute matching the given K/V pair.
    `int` | `getTotalShards()` Gets the number of shards (directories) in this index
    `boolean` | `isDelBatchEmpty()` Verifies if the deletes batch associated to this index is empty.
    `boolean` | `isDelBatchFull()` Verifies if the deletes batch associated to this index is full.
    `boolean` | `isUpdatesBatchEmpty()` Verifies if the updates batch associated to this index is empty.
    `boolean` | `isUpdatesBatchFull()` Verifies if the updates batch associated to this index is full.
    `CloseableIterable<T>` | `query(String key, Object value, boolean useWildcards)` Gets all the elements matching the specified K/V property within the index
    `void` | `refreshIndex(long lStartSCN, long lEndSCN)` Auto-refresh an index based on all insert/deletes between the specified start and end SCN.
    `void` | `remove(T element)` Deletes an element from this index
    `void` | `removeAll(String key)` Removes all the elements from the index matching the specified key.

    - ### Methods inherited from interface com.tinkerpop.blueprints.Index

      `count, get, getIndexName, put, query, remove`

- - ### Field Detail

    - #### EDGE_ID_PROP

          static final String EDGE_ID_PROP

      A constant text index field name for the ID of an edge
      See Also:
        Constant Field Values

    - #### EDGE_LABEL_PROP

          static final String EDGE_LABEL_PROP

      A constant text index field name for the label of an edge
      See Also:
        Constant Field Values

    - #### END_NODE_ID_PROP

          static final String END_NODE_ID_PROP

      A constant text index field name for the ID of an edge's head (destination) vertex
      See Also:
        Constant Field Values

    - #### START_NODE_ID_PROP

          static final String START_NODE_ID_PROP

      A constant text index field name for the ID of an edge's tail (starting) vertex
      See Also:
        Constant Field Values

    - #### TYPE_DT_BOOL

          static final char TYPE_DT_BOOL

      This constant denotes a Boolean data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_DATE

          static final char TYPE_DT_DATE

      This constant denotes a Date (java.util.Date) data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_DOUBLE

          static final char TYPE_DT_DOUBLE

      This constant denotes a Double data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_FLOAT

          static final char TYPE_DT_FLOAT

      This constant denotes a Float data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_INTEGER

          static final char TYPE_DT_INTEGER

      This constant denotes an Integer data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_SERIALIZABLE

          static final char TYPE_DT_SERIALIZABLE

      This constant denotes a Serializable data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### TYPE_DT_STRING

          static final char TYPE_DT_STRING

      This constant denotes a String data type for the value field of an attribute (K/V pair)
      See Also:
        Constant Field Values

    - #### VERTEX_ID_PROP

          static final String VERTEX_ID_PROP

      A constant text index field name for the ID of a vertex
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### add

          void add(T element)

      Adds a new Element into the index using all its associated key/value pairs
      Parameters:
        `element` - an `Element` object.
      Throws:
        `IOException`

    - #### buildSearchTerm

          String buildSearchTerm(String key,
                               Object value)

      Builds a search term query expression in the syntax required by this index.
      Parameters:
        `key` - the key of the K/V property
        `value` - the value object of the K/V property

    - #### buildSearchTerm

          String buildSearchTerm(String key,
                               Object value,
                               Class dtClass)

      Builds a search term query expression in the syntax required by this index.
      Parameters:
        `key` - the key of the K/V property
        `value` - the value object of the K/V property
        `dtClass` - class of the value object

    - #### clearIndex

          void clearIndex()

      Clears all data stored in the text index.

    - #### close

          void close()

      Closes this OracleIndex object

    - #### commit

          void commit()

      Commit changes

    - #### count

          long count(String key,
                   Object value,
                   boolean acceptWildcard)

      Counts all the matching elements that have a particular key/value property within the index
      Parameters:
        `key` - the name of the property. It MUST not be NULL. If the key is not found in the index, the result will be 0.
        `value` - the value object of the property. It can be NULL which will cause all edges with the given key to be returned.
        `acceptWildcard` - specifies if wild cards can be used in the value object.
      Returns:
        a positive long integer representing the number of elements matching the K/V property.

    - #### count

          long count(String key,
                   Object value,
                   Class dtClass,
                   boolean acceptWildcard)

      Counts all the matching elements that have a particular key/value property within the index
      Parameters:
        `key` - the name of the property. It MUST not be NULL. If the key is not found in the index, the result will be 0.
        `value` - the value object of the property. It can be NULL which will cause all edges with the given key to be returned.
        `dtClass` - the class representing the datatype of the property value. This can be used to cast the property value to a different datatype. For example, if the value is "3.01" and dtClass is Float.Class, then this value will be treated as a 3.01f.
        `acceptWildcard` - specifies if wild cards can be used in the value object.
      Returns:
        a `CloseableIterable` object.

    - #### dropIndex

          void dropIndex()

      Drops and removes all data from the text index (including its directory)

    - #### get

          CloseableIterable<T> get(String key,
                                 Object value,
                                 boolean acceptWildcard)

      Gets an Iterable object with all the matching elements that have a particular key/value property within the index
      Parameters:
        `key` - the name of the property. It MUST not be NULL. If the key is not found in the index, the result will be 0.
        `value` - the value object of the property. It can be NULL which will cause all edges with the given key to be returned.
        `acceptWildcard` - specifies if wild cards can be used in the value object.
      Returns:
        a `CloseableIterable` object.

    - #### get

          CloseableIterable<T> get(String key,
                                 Object value,
                                 Class dtValue,
                                 boolean acceptWildcard)

      Gets an Iterable object with all the matching elements that have a particular key/value property within the index
      Parameters:
        `key` - the name of the property. It MUST not be NULL. If the key is not found in the index, the result will be 0.
        `value` - the value object of the property. It can be NULL which will cause all edges with the given key to be returned.
        `dtValue` - the class representing the datatype of the property value. This can be used to cast the property value to a different datatype. For example, if the value is "3.01" and dtClass is Float.Class, then this value will be treated as a 3.01f.
        `acceptWildcard` - specifies if wild cards can be used in the value object.
      Returns:
        a `CloseableIterable` object.

    - #### getDirectoryName

          String getDirectoryName()

      Gets the directory name for this index.
      Returns:
        the directory name for this index.

    - #### getDocIdentifier

          String getDocIdentifier()

      Get index document's identifier.
      Returns:
        a String representing the document's identifier based on the entity type it handles (edge or vertex).

    - #### getGraphName

          String getGraphName()

      Get the name of the associated graph

    - #### getIndexClass

          Class<T> getIndexClass()

      Gets the class associated to this index
      Specified by:
        `getIndexClass` in interface `Index<T extends Element>`
      Returns:
        Vertex.class if this is a vertex index or Edge.class if this is an Edge index.

    - #### getOracleIndexParameters

          OracleIndexParameters getOracleIndexParameters()

      Gets the OracleIndexParameters associated to this index

    - #### getParameters

          Parameter[] getParameters()

      Gets the OracleIndexParameters associated to this index

    - #### getPartitioned

          CloseableIterable<T>[] getPartitioned(Object[] connections,
                                              String key,
                                              Object value,
                                              boolean acceptWildcard,
                                              int startShardId)

      Gets an array of `CloseableIterable` objects that hold all the elements with an attribute matching the given K/V pair. Each element in the `CloseableIterable` array uses a separate connection provided to fetch a subset of the results from a corresponding shard. Note that we assign an integer ID (in the range of [0, N - 1]) to all the shards in the index with N shards. The subset of shards queried will consist of those shards with ID value in the range of [startShardId, startShardId - 1 + size of connections array].
      Parameters:
        `connections` - an array of connections to the search engine.
        `key` - the key of a property
        `value` - the value object of the property.
        `acceptWildcard` - specifies if wild cards can be used in the value object.
        `startShardId` - the ID of the starting shard.
      Returns:
        a `CloseableIterable` object.

    - #### getPartitioned

          CloseableIterable<T>[] getPartitioned(Object[] connections,
                                              String key,
                                              Object value,
                                              Class dtValue,
                                              boolean acceptWildcard,
                                              int startShardId)

      Gets an array of `CloseableIterable` objects that hold all the elements with an attribute matching the given K/V pair. Each element in the `CloseableIterable` array uses a separate connection provided to fetch a subset of the results from a corresponding shard. Note that we assign an integer ID (in the range of [0, N - 1]) to all the shards in the index with N shards. The subset of shards queried will consist of those shards with ID value in the range of [startShardId, startShardId - 1 + size of connections array].
      Parameters:
        `connections` - an array of connections to the search engine.
        `key` - the key of a property
        `value` - the value object of the property.
        `dtValue` - the class representing the datatype of the property value. This can be used to cast the property value to a different datatype. For example, if the value is "3.01" and dtClass is Float.Class, then this value will be treated as a 3.01f.
        `acceptWildcard` - specifies if wild cards can be used in the value object.
        `startShardId` - the ID of the starting shard.
      Returns:
        a `CloseableIterable` object.

    - #### getTotalShards

          int getTotalShards()

      Gets the number of shards (directories) in this index

    - #### isDelBatchEmpty

          boolean isDelBatchEmpty()

      Verifies if the deletes batch associated to this index is empty.
      Returns:
        true if the deletes batch is full, else return false.

    - #### isDelBatchFull

          boolean isDelBatchFull()

      Verifies if the deletes batch associated to this index is full.
      Returns:
        true if the deletes batch is full, else return false.

    - #### isUpdatesBatchEmpty

          boolean isUpdatesBatchEmpty()

      Verifies if the updates batch associated to this index is empty.
      Returns:
        true if the updates batch is full, else return false.

    - #### isUpdatesBatchFull

          boolean isUpdatesBatchFull()

      Verifies if the updates batch associated to this index is full.
      Returns:
        true if the updates batch is full, else return false.

    - #### query

          CloseableIterable<T> query(String key,
                                   Object value,
                                   boolean useWildcards)

      Gets all the elements matching the specified K/V property within the index
      Parameters:
        `key` - the key of the K/V property
        `value` - the value object of the K/V property
        `useWildcards` - specifies if wild cards can be used in the value object.
      Returns:
        a `CloseableIterable` object.

    - #### refreshIndex

          void refreshIndex(long lStartSCN,
                          long lEndSCN)

      Auto-refresh an index based on all insert/deletes between the specified start and end SCN.
      Parameters:
        `lStartSCN` - start SCN value. A NULL value will be treated as MINVALUE to the underlying Oracle Database.
        `lEndSCN` - end SCN value. A NULL value will be treated as MAXVALUE to the underlying Oracle Database.

    - #### remove

          void remove(T element)

      Deletes an element from this index
      Parameters:
        `element` - an `Element` object.
      Throws:
        `IOException`

    - #### removeAll

          void removeAll(String key)

      Removes all the elements from the index matching the specified key.
      Parameters:
        `key` - the key to remove from the index.

Copyright © 2015 Oracle and/or its afflilates. All Rights Reserved.